﻿





using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using ProtoBuf;

namespace Serialization
{
    /// <summary>
    /// This class represents the player's account. An account holds the player's name as well as all the unlocked achievements of said
    /// player.
    /// </summary>
    [ProtoContract]
    public class Account
    {
        [ProtoMember(1)]
	    public string name
	    {
		    get;
		    private set;
	    }

        [ProtoMember(2)]
	    public List<Achievement> achievements
	    {
		    get;
		    private set;
	    }

	    public Account(string name)
	    {
            this.name = name;
            achievements = new List<Achievement>();
	    }

        /// <summary>
        /// Empty constructor needed for serialization
        /// </summary>
        private Account()
        {
            achievements = new List<Achievement>();
        }
    }
}

